﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CoreProject.IRepository;
using CoreProject.IService;
using CoreProject.Model;

namespace CoreProject.Service
{
    public class MessageService : BaseService<Message>, IMessageService
    {
        private readonly IMessageRepository _repository;

        public MessageService(IMessageRepository repository) : base(repository)
        {
            this._repository = repository;
        }

        public async Task<(List<Message> list, int count)> GetMessageBypage(string name, int page, int size)
        {
          return await _repository.GetMessageBypage(name, page, size);
        }
    }
}
